<?php
$pageId = 'cpt';
//dump($data);
?>
<!DOCTYPE html>
<html lang="zhcn">
<head>
    <include file="Common/meta" />
    <title>竞赛搜索结果 - {$_ENV['site'][0]['title']}</title>
    <include file="Common/link" />
</head>
<body>
<header class="layout-header">
    <div class="container">
        <div class="search-box dropdown">
            <button type="button" class="btn search-select dropdown-toggle"
                    data-toggle="dropdown">
                <span id="tc-select-text">竞赛</span>
                <i class="icon icon-down"></i>
            </button>
            <ul id="tc-select" class="dropdown-menu" role="menu">
                <li><a href="#" data-value="0">学生</a></li>
                <li><a href="#" data-value="1">企业</a></li>
                <!--<li><a href="#" data-value="2">资讯</a></li>-->
                <li><a href="#" data-value="3">竞赛</a></li>
            </ul>
            <input id="search-input" class="search-input" value="{$data['key']}" placeholder="请输入关键字搜索">
            <a href="#"></a> <i id="search-btn" class="icon icon-search"></i>
        </div>
        <a class="header-back" href="/"><i class="icon icon-left"></i></a>
    </div>
</header>
<div class="layout-body">
    <div class="container">
        <?php
        //dump($data);
        ?>
        <div id="search-empty" class="content-empty">
            <div class="picture"></div>
            <div class="no-data">没有符合条件的相关数据</div>
        </div>
        <ul id="cpt-list" class="list-common cpt-list">
            <foreach name="data['list']" item="cpt">
                <li class="list-item">
                    <img class="item-logo" src="{$cpt['logo']}">
                    <div class="item-info">
                        <a class="item-title" href="/competition/detail?id={$cpt['cpt_id']}" target="_blank">{$cpt['title']}</a>
                        <div class="cpt-info">
                            <span class="info">主办方: {$cpt['school']}</span>
                            <span class="info">时间: {$cpt['start_time']|strtotime|date='Y.m.d',###} - {$cpt['end_time']|strtotime|date='Y.m.d',###}</span>
                        </div>
                    </div>
                </li>
            </foreach>

        </ul>
        <ul id="cpt-page"></ul>
    </div>
</div>
<script>
    var page = {
        keyword: '{$data['key']}',
        searchType: 3,
        searchArea: '{$data['area']}',
        searchIndustry: '{$data['indus']}',
        page: '{$data['page']}',
    };
</script>
<include file="Common/script" />
<script src="__PUBLIC__/asset/js/search.js"></script>
</body>
</html>

